<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 仍然假设ajax请求数据
let p1 = new Promise(function(resolve, reject) {
    ajax(url1, function(res1) {
        resolve(res1);
    })
})
let p2 = p1.then(function(res1) {
    return new Promise(function(resolve, reject) {
        ajax(url2, function(res2) {
            resolve(res2);
        })
    })
})
let p3 = p2.then(function(res2) {
    return new Promise(function(resolve, reject) {
        ajax(url3, function(res3) {
            resolve(res3);
        })
    })
})
let p = Promise.all({p1,p2,p3}); 
p.then((res)=>{ console.log(res); })


    </script>
    
</body>
</html>